{template misc/js_sharebutton}
<div class="scrollBtn hide" id="scrollBtn">
	<ul class="clearfix">
		<li class="sB-like"><a href="javascript:void(0);" data-action="addLike" data-params="$share['share_id'],scrollBtn" title="{lang tip_like}" id="$share['share_id']_likenum"><b>{lang tip_like}</b><em>$share['total_like']</em></a></li>
		<li class="sB-view"><a href="javascript:void(0);" title="{lang view}"><i>$share['total_click']</i></a></li>
		{if $share['price']}
		<li class="sB-shopping">
			{if !is_empty($share['promotion_url'])}
			<a href="{url share/buy?mid=$share['item_id']}" target="_blank" title="{lang go_purchase}"><i>{$settings['priceunit']}$share['price']</i></a>
			{elseif $share['reference_itemid']}
			<a href="$reflink" data-itemid="$share['reference_itemid']" target="_blank" title="{lang go_purchase}"><i>{$settings['priceunit']}$share['price']</i></a>
			{else}
			<a href="$reflink" target="_blank" title="{lang go_purchase}"><i>{$settings['priceunit']}$share['price']</i></a>
			{/if}
		</li>
		{/if}
		<li class="sB-comment"><a href="javascript:void(0);" title="{lang comment}"><b>{lang comment}</b><i>$share['total_comment']</i></a></li>
		{if $share['reference_url']&&!$share['price']}
		<li class="sB-link slide-ext"><a href="$reflink"  class="pull-left"><b>link</b></a>
			<div class="extension pull-left" style="padding: 0px 10px 0px 10px;width: 164px;" data-width="238">
				<a href="$reflink" target="_blank"><strong>$refhost</strong></a>
			</div>
		</li>
		{/if}
		<li class="sB-rss slide-ext">
			<a class="pull-left" href="javascript:void(0);" ><b>rss</b></a>
			<div class="extension pull-left" style="padding: 0px 10px 0px 10px;" data-width="238">
				{loop $sharebuttons $key $target}
				<a href="javascript:void(0);" rel="tooltip" title="{$target['name']}" data-action="socialShare" data-params="$share['share_id'],$key"><i class="lpico-$key"></i></a>
				{/loop}
			</div>
		</li>
		{if $share['item_type']!='article'&&$share['color']}
		<li class="sB-color">
			<ul class="color-chips">
				 <li class="color">
				 <a href="{url pin/color?cdx=$share['color']}" style="background-color: $colorsetting[$share['color']]" title="$share['color']">color</a>
				 </li>
			</ul>
		</li>
		{/if}
		
	</ul>
</div>

<script type="text/javascript">
$(document).ready(function() {
	$("#scrollBtn").pageScroll({
		dur : 1000,
		doc : "content-wrapper",
		elementOffsettop : 175,
		elementOffsetLeft : -80,
		elementOffsetRight : 0,
		elementOffsetBottom : 0
	});
	$('.sB-comment').live('click', function(event) {
		 $.scrollTo('#sharecomments',500); 
	});
	$('.slide-ext').live('hover', function(event) {
		switch(event.type){
		case 'mouseenter':
			$(this).css('overflow','visible');
			var ext = $(this).find('.extension');
			$(this).css('width',ext.attr('data-width'));
			ext.stop().fadeTo(300, 1);
			break;
		case 'mouseleave':
			$(this).css('overflow','hidden');
			$(this).css('width','54');
			$(this).find('.extension').stop().fadeTo(300, 0);
			break;
		}
	});
});
</script>